﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VISS.API.Users {

    /// <summary>
    /// This interface is used for Web Admin to manage user general profile
    /// </summary>
    public interface IUserGeneralProfileAdmin {

        /// <summary>
        /// Updates the UserGeneralProfileEnt item.
        /// </summary>
        /// <param name="item">The UserGeneralProfileEnt item.</param>
        /// <returns>Return true if success, otherwise return false</returns>
        bool Update(UserGeneralProfileEnt item);

        /// <summary>
        /// Gets the by user key.
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <returns>Return true if success, otherwise return false</returns>
        UserGeneralProfileEnt GetByUserKey(string userKey);

        /// <summary>
        /// Increases the archive point.
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <param name="archivePointNCT">The archive point NCT.</param>
        /// <param name="archivePoint">The archive point.</param>
        /// <param name="leftPoint">The left point.</param>
        /// <returns>Return true if success, otherwise return false</returns>
        bool IncreaseArchivePoint(string userKey, int archivePointNCT, out int archivePoint, out int leftPoint);
        //bool IncreaseImageCount(string userKey, out int imageCount);
        //bool IncreaseImageCount(string userKey, int imageCountNCT,  out int imageCount);
        //bool IncreaseTrusted(string userKey, out int trusted);

        /// <summary>
        /// Decreases the archive point.
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <param name="archivePointNCT">The archive point NCT.</param>
        /// <param name="archivePoint">The archive point.</param>
        /// <returns>Return true if success, otherwise return false</returns>
        bool DecreaseArchivePoint(string userKey, int archivePointNCT, out int archivePoint);
        //bool DecreaseLeftPoint(string userKey, int leftPointNCT, out int leftPoint);
        //bool DecreaseImageCount(string userKey, out int imageCount);
        //bool DecreaseImageCount(string userKey, int imageCountNCT, out int imageCount);
       // bool DecreaseTrusted(string userKey, out int trusted);
        
        //report
        /// <summary>
        /// Counts the female user.
        /// </summary>
        /// <returns>Return number of user</returns>
        long CountFemaleUser();
        /// <summary>
        /// Counts the male user.
        /// </summary>
        /// <returns>Return number of user</returns>
        long CountMaleUser();
        /// <summary>
        /// Counts the by age range.
        /// </summary>
        /// <param name="fromAge">From age.</param>
        /// <param name="toAge">To age.</param>
        /// <returns>Return number of user</returns>
        long CountByAgeRange(byte fromAge, byte toAge);
    }
}
